package model

import (
	"context"
	"fmt"
	"time"

	triple_greet "dubbox/triple/proto/triple"
)

type GreetTripleServer struct {
}

func (srv *GreetTripleServer) Greet(ctx context.Context, req *triple_greet.GreetRequest) (*triple_greet.GreetResponse, error) {
	fmt.Println("GreetTripleServer", req, time.Now().Second())
	resp := &triple_greet.GreetResponse{Greeting: req.Name}
	return resp, nil
}

type GreetTriple struct {
}

func (srv *GreetTriple) Greet(ctx context.Context, req *triple_greet.GreetRequest) (*triple_greet.GreetResponse, error) {
	fmt.Println("GreetTriple", req, time.Now().Second())
	resp := &triple_greet.GreetResponse{Greeting: req.Name}
	return resp, nil
}

type SayHello struct {
}

func (*SayHello) SayHello(req string, req1 string, req2 string) (string, error) {
	return req + req1 + req2, nil
}
